{\rtf1\mac\ansicpg10000\cocoartf102
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fnil\fcharset77 Monaco;
}
{\colortbl;\red255\green255\blue255;\red0\green0\blue191;\red96\green96\blue96;\red0\green115\blue0;
}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\b\fs36 \cf0 PV_MagMinus			subtract spectral energy\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f1\b0\fs24 \cf0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\b \cf0 PV_MagMinus.ar(bufferA,  bufferB, remove)\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f1\b0 \cf0 \
Subtracts buffer B's magnitudes from buffer A.\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\b \cf0 bufferA
\f1\b0  - fft buffer A.\

\f0\b bufferB
\f1\b0  - fft buffer B.\

\f0\b remove
\f1\b0  - scale the removal process.\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f2\fs18 \cf0 s.boot;\
(\
b = \cf2 Buffer\cf0 .alloc(s, 2048, 1);\
c = \cf2 Buffer\cf0 .alloc(s, 2048, 1);\
d = \cf2 Buffer\cf0 .read(s, \cf3 "sounds/a11wlk01.wav"\cf0 );\
)\
\
(\
\cf2 SynthDef\cf0 (\cf3 "help-magMinus"\cf0 , \{ \cf2 arg\cf0  out=0, bufnumA=0, bufnumB=1, soundBufnum=2;\
	\cf2 var\cf0  inA, inB, chainA, chainB, chain;\
	inA = \cf2 PlayBuf\cf0 .ar(1, soundBufnum, \cf2 BufRateScale\cf0 .kr(soundBufnum), loop: 1);\
	inB = \cf2 WhiteNoise.ar(LFNoise2.kr(20).max(0));\cf0 \
	chainA = \cf2 FFT\cf0 (bufnumA, inA);\
	chainB = \cf2 FFT\cf0 (bufnumB, inB);\
	chain = \cf2 PV_MagMinus\cf0 (chainA, chainB, MouseX.kr(0, 1)); \
	\cf2 Out\cf0 .ar(out,  \cf2 IFFT\cf0 (chain).dup);\
\}).play(s,[\cf4 \\out\cf0 , 0, \cf4 \\bufnumA\cf0 , b.bufnum, \cf4 \\bufnumB\cf0 , c.bufnum, \cf4 \\soundBufnum\cf0 , d.bufnum]);\
)}